<!-- 钩子函数之创建 vue 实例前后 -->
<script src="vue.js"></script>

<div id="app">
    <p>{{msg}}</p>
</div>

<script>
    var vue = new Vue({
        el: "#app",
        data: {
            msg: "我出来了"
        },
        created() {
            console.log("实例化对象之后：");
            console.log("获取变量值：" + this.$data.msg);
        },
        beforeCreate() {
            console.log("实例化对象之前：");
            console.log("获取变量值：" + this.$data.msg);
        }
    })
</script>

<style>

</style>